<?php
namespace app\index\controller;
use app\index\controller\Base;
class Index  extends Base
{
      public function index()
      {    
          // 推荐位
           $type=input("get.type",0,"intval");
           $type1=input("get.type",1,"intval");
           $result=model("Featured")->getFeaturedsByType($type1);
           //左侧
           $results=model("Featured")->getFeaturedsByType($type);
           //按照商品分类与城市分类展示商品
           $meicatedeals=model("Deal")->getNormalDealByCategoryCityId(1,$this->city->id);
           //美食团购单
           $meicates=model("Category")->getNormalRecommendCategoryByParentId(1,5);
           //电影团购单
           $mediadeals=model("Deal")->getNormalDealByCategoryCityId(34,$this->city->id);
           //电影分类
           $mediacates=model("Category")->getNormalRecommendCategoryByParentId(34,5);
         return  $this->fetch("",[
             'results'=>$results,
             "result"=>$result,
             "meicatedeals"=>$meicatedeals,
             "meicates"=>$meicates,
             "mediadeals"=>$mediadeals,
             "mediacates"=>$mediacates,
         ]);
      }
}
